package com.pe.pgn.clubpgn.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.pe.pgn.clubpgn.dao.MetaDao;
import com.pe.pgn.clubpgn.domain.ClpbPrograma;
import com.pe.pgn.clubpgn.domain.ClpdMeta;
import com.pe.pgn.clubpgn.service.MetaService;

@Service("metaService")
public class MetaServiceImpl extends GenericManagerImpl<ClpdMeta, Long> implements MetaService{

	@Autowired
	private MetaDao metaDao;

	public ClpbPrograma findPrograma(Long coPrograma) {
		return metaDao.findPrograma(coPrograma);
	}

	public List<Map<String, Object>> metasPorProgramas(Long coPrograma) {
		return metaDao.metasPorProgramas(coPrograma);
	}

	public void eliminarMeta(Long idMeta) {
		metaDao.eliminarMeta(idMeta);
	}

	public void saveOrUpdateMeta(ClpdMeta meta) {
		metaDao.saveOrUpdateMeta(meta);
	}
}
